package com.cn.zpark;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

/**
 * @PackageName: com.cn.zpark
 * @ClassName: SessionAttrAddRemoveReplaceListener
 * @Description:
 * @author: RZS
 * @date: 2022/4/18  15:20
 */
@WebListener
public class SessionAttrAddRemoveReplaceListener implements HttpSessionAttributeListener {
    @Override
    public void attributeAdded(HttpSessionBindingEvent event) {
        System.out.println("session域中添加绑定数据");
    }

    @Override
    public void attributeRemoved(HttpSessionBindingEvent event) {
        System.out.println("session域中移除绑定数据");
    }

    @Override
    public void attributeReplaced(HttpSessionBindingEvent event) {
        System.out.println("session域中绑定数据被替换");
    }
}
